﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 生成验证码图片
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void Button_Create_Click(object sender, EventArgs e)
        {
            if (this.pictureBox.Image != null)
            {
                this.pictureBox.Image.Dispose();
            }

            this.pictureBox.Image = IdentifyingCode.GetIdentifyingCodeBitmap(out string code);
            this.label_Code.Text = code;
        }
    }
}
